package edu.gdut.thesissys.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * AccreditationDebate entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "accreditation_debate", catalog = "gdutmis")
public class AccreditationDebate extends BaseVo implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = -1194047295740169039L;
	private String studentId;
	private Student student;
	private String finalGrade;
	private Double allGrade;
	private Double debateGrade;
	private String teacherComment;
	private String state;

	// Constructors

	/** default constructor */
	public AccreditationDebate() {
	}

	/** minimal constructor */
	public AccreditationDebate(String studentId, Student student) {
		this.studentId = studentId;
		this.student = student;
	}

	/** full constructor */
	public AccreditationDebate(String studentId, Student student,
			String finalGrade, Double allGrade, Double debateGrade,
			String teacherComment, String state) {
		this.studentId = studentId;
		this.student = student;
		this.finalGrade = finalGrade;
		this.allGrade = allGrade;
		this.debateGrade = debateGrade;
		this.teacherComment = teacherComment;
		this.state = state;
	}

	// Property accessors
	@Id
	@Column(name = "student_id", unique = true, nullable = false, length = 10)
	public String getStudentId() {
		return this.studentId;
	}

	public void setStudentId(String studentId) {
		this.studentId = studentId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "student_id", unique = true, nullable = false, insertable = false, updatable = false)
	public Student getStudent() {
		return this.student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	@Column(name = "final_grade", length = 6)
	public String getFinalGrade() {
		return this.finalGrade;
	}

	public void setFinalGrade(String finalGrade) {
		this.finalGrade = finalGrade;
	}

	@Column(name = "all_grade", precision = 5)
	public Double getAllGrade() {
		return this.allGrade;
	}

	public void setAllGrade(Double allGrade) {
		this.allGrade = allGrade;
	}

	@Column(name = "debate_grade", precision = 5)
	public Double getDebateGrade() {
		return this.debateGrade;
	}

	public void setDebateGrade(Double debateGrade) {
		this.debateGrade = debateGrade;
	}

	@Column(name = "teacher_comment", length = 65535)
	public String getTeacherComment() {
		return this.teacherComment;
	}

	public void setTeacherComment(String teacherComment) {
		this.teacherComment = teacherComment;
	}

	@Column(name = "state", length = 1)
	public String getState() {
		return this.state;
	}

	public void setState(String state) {
		this.state = state;
	}

}